public class Solution {
    public int[] SortArray(int[] nums) 
    {
       BJ(0,nums.Length-1,nums);
        return nums;
    }
    public void BJ(int low,int high,int[] arr)
    {
        if(low<high)
        {
            int mid =KP(arr,low,high);
            BJ(low,mid-1,arr);
            BJ(mid+1,high,arr);
        }
    }
    public int KP(int[] arr,int low,int high)
    {
        int t=arr[low];
        while(low<high)
        {
            while(low<high&&t<arr[high])
            {
                high--;
            }
            arr[low]=arr[high];
            while(low<high&&t>=arr[low])
            {
                low++;
            }
            arr[high]=arr[low];
        }
        arr[low]=t;
        return low;
    }
}